hide := @
ECHO := echo

G++ := /home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/host/bin/arm-linux-gnueabihf-gcc
CFLAGS := -I/home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/build/rkmedia/include/rkmedia \
			-I/home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/rkaiq/common \
			-I/home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/rkaiq/xcore \
			-I/home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/rkaiq/uAPI \
			-I/home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/rkaiq/algos \
			-I/home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/rkaiq/iq_parser \
			-I./rknn_rockx_include \
			-I./ \
			-I./librtsp \
			
LIB_FILES := -L/home/yifeng/rv1126_rv1109_linux_sdk_v1.8.0_20210224/buildroot/output/rockchip_rv1126_rv1109_spi_nand/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib \
			-L./rv1126_lib \
			
LIBS := ./librtsp/librtsp.a \

LD_FLAGS := -lpthread -leasymedia -ldrm -lrockchip_mpp \
	        -lavformat -lavcodec -lswresample -lavutil \
			-lasound -lv4l2 -lv4lconvert -lrga \
			-lRKAP_ANR -lRKAP_Common -lRKAP_3A \
			-lmd_share -lrkaiq -lod_share -lrknn_api \
			-lrockx \
			
CFLAGS += -DRKAIQ

SAMPLE_COMMON := sample_common_isp.c 
all:
	$(G++) rockx_face_detection_rtsp.c $(SAMPLE_COMMON) $(CFLAGS) $(LIB_FILES) $(LD_FLAGS) $(LIBS) -o rockx_face_detection_rtsp
	$(hide)$(ECHO) "Build Done ..."

clean:
	rm -rf rockx_face_detection_rtsp
